data = data3d('../data/head.npz', 'short')
exposure = float_param(0, -20, 20, 'E')
step = float_param(0.003, 0.0001, 0.01, 'S')


m = 0.0
steps = length(E - S) / step

for t in linspace(0.0, 1.0, steps):
    pos = (1-t) * S + t * E
    m = max(m, linear_query_3d(data, pos))

return float3(m * pow(2.0, exposure))

